package com.freshminds.saudiproject;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class SemisterActivity extends Activity implements OnClickListener
{
	ImageView imgVwBack,imgVwSemister1,imgVwSemister2;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_semister_home);
		
		imgVwBack=(ImageView)findViewById(R.id.ximgVwBack);
		imgVwSemister1=(ImageView)findViewById(R.id.ximgVwSemister1);
		imgVwSemister2=(ImageView)findViewById(R.id.ximgVwSemister2);
		imgVwBack.setOnClickListener(this);
		imgVwSemister1.setOnClickListener(this);
		imgVwSemister2.setOnClickListener(this);
		findBottomMenuView();
	}
	
	void findBottomMenuView()
	{
		ImageView imgVwFeatured,imgVwMostViewed,imgVwMyFavourites,imgVwSendToFriend;
		
		imgVwFeatured=(ImageView)findViewById(R.id.ximgVwFeatured);
		imgVwMostViewed=(ImageView)findViewById(R.id.ximgVwMostViewed);
		imgVwMyFavourites=(ImageView)findViewById(R.id.ximgVwMyFavourites);
		imgVwSendToFriend=(ImageView)findViewById(R.id.ximgVwSendToFriend);
		
		imgVwFeatured.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(SemisterActivity.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		imgVwMostViewed.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				startActivity(new Intent(SemisterActivity.this, MostViewed.class));
				
			}
		});
		
		imgVwMyFavourites.setOnClickListener(new OnClickListener() 
		{
			
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(SemisterActivity.this);
				utility.showToast("Button Clicked");
				
			}
		});

		imgVwSendToFriend.setOnClickListener(new OnClickListener()
		{
	
			@Override
			public void onClick(View v) 
			{
				Utility utility=new Utility(SemisterActivity.this);
				utility.showToast("Button Clicked");
				
			}
		});
		
		
		
		
	}
	

	@Override
	public void onClick(View v) 
	{
		switch (v.getId()) 
		{
		case R.id.ximgVwBack:
				finish();
			break;
		case R.id.ximgVwSemister1:
			Utility utility=new Utility(SemisterActivity.this);
			utility.showToast("Semister 1 Selected");
			break;
		case R.id.ximgVwSemister2:
			Utility utility2=new Utility(SemisterActivity.this);
			utility2.showToast("Semister 2 Selected");
			break;
			

		default:
			break;
		}
		
	}
}
